package com.wocao.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wocao.entity.ReqBody;
import com.wocao.entity.SysRole;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * 角色信息表 服务类
 */
public interface SysRoleService extends IService<SysRole> {

    //分页查询
    Page<SysRole> selectAllPage(Page page, ReqBody reqBody);

    //打开
    void openStatus(long roleId);

    //关闭
    void closeStatus(long roleId);

    //角色添加
    void addRole(SysRole sysRole,Object[] menuIds);

    //通过角色Id查询所用有的菜单
    List<Long> selectMenuIdsByRoleId(long roleId);

    //角色修改
    void roleEdit(SysRole sysRole,Object[] menuIds);

    //删除某角色（实际为把删除状态改为1）
    void deleteRole(long roleId);

    //批量删除
    void deleteRoles(Object[] roleIds);

    //修改数据权限
    void editRoleDept(SysRole sysRole,Object[] deptIds);

    //导出
    void derive(HttpServletResponse response, String[] roleIds) throws IOException;

}
